package cn.phonevane.service.impl;

import java.util.List;

import cn.phonevane.dao.BaseDao;
import cn.phonevane.model.TTopic;
import cn.phonevane.service.TopicService;

public class TopicServiceImpl implements TopicService{
	
	private BaseDao baseDao;
	
	public BaseDao getBaseDao() {
		return baseDao;
	}

	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}

	/**
	 * 添加一个专题
	 * @param Object
	 * @return boolean
	 * */
	public boolean add(Object object) {
		// TODO Auto-generated method stub
		return this.baseDao.save(object);
	}
	/**
	 * 获取主题数据
	 * @param num
	 * @return list
	 * */
	public List<TTopic> getPart(int num) {
		int first=0;
		String hql="from TTopic order by topicCreateTime desc";
		return this.baseDao.find(hql, first, num);
	}

}
